package com.dbdata.move.model;

// Generated cafuc by Hibernate Tools 4

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * StudentRecommend generated by hbm2java
 */
@Entity
@Table(name = "student_recommend")
public class StudentRecommend implements java.io.Serializable {

	private Long id;
	private Rank rank;
	private MainPoint mainPoint;
	private StudentResit studentResit;
	private MainPointModule mainPointModule;
	private UserBaseInfo userBaseInfoByCheckerId;
	private Topic topic;
	private AirplaneModel airplaneModel;
	private UserBaseInfo userBaseInfoByStudentId;
	private FlyBase flyBase;
	private WorkOrder workOrder;
	private UserBaseInfo userBaseInfoByRefereeId;
	private Integer studyNum;
	private int rmdState;
	private String comment;
	private Date rmdTime;
	private Date examTime;
	private Integer examNum;
	private byte rmdType;
	private int checkState;
	private Integer flyResult;
	private Integer oralResult;
	private String refusedReason;
	private Set<TrainPlan> trainPlans = new HashSet<TrainPlan>(0);

	public StudentRecommend() {
	}

	public StudentRecommend(Rank rank, Topic topic,
			UserBaseInfo userBaseInfoByStudentId,
			UserBaseInfo userBaseInfoByRefereeId, int rmdState, byte rmdType,
			int checkState) {
		this.rank = rank;
		this.topic = topic;
		this.userBaseInfoByStudentId = userBaseInfoByStudentId;
		this.userBaseInfoByRefereeId = userBaseInfoByRefereeId;
		this.rmdState = rmdState;
		this.rmdType = rmdType;
		this.checkState = checkState;
	}

	public StudentRecommend(Rank rank, MainPoint mainPoint,
			StudentResit studentResit, MainPointModule mainPointModule,
			UserBaseInfo userBaseInfoByCheckerId, Topic topic,
			AirplaneModel airplaneModel, UserBaseInfo userBaseInfoByStudentId,
			FlyBase flyBase, WorkOrder workOrder,
			UserBaseInfo userBaseInfoByRefereeId, Integer studyNum,
			int rmdState, String comment, Date rmdTime, Date examTime,
			Integer examNum, byte rmdType, int checkState, Integer flyResult,
			Integer oralResult, String refusedReason, Set<TrainPlan> trainPlans) {
		this.rank = rank;
		this.mainPoint = mainPoint;
		this.studentResit = studentResit;
		this.mainPointModule = mainPointModule;
		this.userBaseInfoByCheckerId = userBaseInfoByCheckerId;
		this.topic = topic;
		this.airplaneModel = airplaneModel;
		this.userBaseInfoByStudentId = userBaseInfoByStudentId;
		this.flyBase = flyBase;
		this.workOrder = workOrder;
		this.userBaseInfoByRefereeId = userBaseInfoByRefereeId;
		this.studyNum = studyNum;
		this.rmdState = rmdState;
		this.comment = comment;
		this.rmdTime = rmdTime;
		this.examTime = examTime;
		this.examNum = examNum;
		this.rmdType = rmdType;
		this.checkState = checkState;
		this.flyResult = flyResult;
		this.oralResult = oralResult;
		this.refusedReason = refusedReason;
		this.trainPlans = trainPlans;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "RANK_ID", nullable = false)
	public Rank getRank() {
		return this.rank;
	}

	public void setRank(Rank rank) {
		this.rank = rank;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MAIN_POINT_ID")
	public MainPoint getMainPoint() {
		return this.mainPoint;
	}

	public void setMainPoint(MainPoint mainPoint) {
		this.mainPoint = mainPoint;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STUDENT_RESIT_ID")
	public StudentResit getStudentResit() {
		return this.studentResit;
	}

	public void setStudentResit(StudentResit studentResit) {
		this.studentResit = studentResit;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MAIN_POINT_MODULE_ID")
	public MainPointModule getMainPointModule() {
		return this.mainPointModule;
	}

	public void setMainPointModule(MainPointModule mainPointModule) {
		this.mainPointModule = mainPointModule;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CHECKER_ID")
	public UserBaseInfo getUserBaseInfoByCheckerId() {
		return this.userBaseInfoByCheckerId;
	}

	public void setUserBaseInfoByCheckerId(UserBaseInfo userBaseInfoByCheckerId) {
		this.userBaseInfoByCheckerId = userBaseInfoByCheckerId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TOPIC_ID", nullable = false)
	public Topic getTopic() {
		return this.topic;
	}

	public void setTopic(Topic topic) {
		this.topic = topic;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PLANE_MODEL_ID")
	public AirplaneModel getAirplaneModel() {
		return this.airplaneModel;
	}

	public void setAirplaneModel(AirplaneModel airplaneModel) {
		this.airplaneModel = airplaneModel;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STUDENT_ID", nullable = false)
	public UserBaseInfo getUserBaseInfoByStudentId() {
		return this.userBaseInfoByStudentId;
	}

	public void setUserBaseInfoByStudentId(UserBaseInfo userBaseInfoByStudentId) {
		this.userBaseInfoByStudentId = userBaseInfoByStudentId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "FLY_BASE_ID")
	public FlyBase getFlyBase() {
		return this.flyBase;
	}

	public void setFlyBase(FlyBase flyBase) {
		this.flyBase = flyBase;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "WORKORDER_ID")
	public WorkOrder getWorkOrder() {
		return this.workOrder;
	}

	public void setWorkOrder(WorkOrder workOrder) {
		this.workOrder = workOrder;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "REFEREE_ID", nullable = false)
	public UserBaseInfo getUserBaseInfoByRefereeId() {
		return this.userBaseInfoByRefereeId;
	}

	public void setUserBaseInfoByRefereeId(UserBaseInfo userBaseInfoByRefereeId) {
		this.userBaseInfoByRefereeId = userBaseInfoByRefereeId;
	}

	@Column(name = "STUDY_NUM")
	public Integer getStudyNum() {
		return this.studyNum;
	}

	public void setStudyNum(Integer studyNum) {
		this.studyNum = studyNum;
	}

	@Column(name = "RMD_STATE", nullable = false)
	public int getRmdState() {
		return this.rmdState;
	}

	public void setRmdState(int rmdState) {
		this.rmdState = rmdState;
	}

	@Column(name = "COMMENT", length = 200)
	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "RMD_TIME", length = 19)
	public Date getRmdTime() {
		return this.rmdTime;
	}

	public void setRmdTime(Date rmdTime) {
		this.rmdTime = rmdTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "EXAM_TIME", length = 19)
	public Date getExamTime() {
		return this.examTime;
	}

	public void setExamTime(Date examTime) {
		this.examTime = examTime;
	}

	@Column(name = "EXAM_NUM")
	public Integer getExamNum() {
		return this.examNum;
	}

	public void setExamNum(Integer examNum) {
		this.examNum = examNum;
	}

	@Column(name = "RMD_TYPE", nullable = false)
	public byte getRmdType() {
		return this.rmdType;
	}

	public void setRmdType(byte rmdType) {
		this.rmdType = rmdType;
	}

	@Column(name = "CHECK_STATE", nullable = false)
	public int getCheckState() {
		return this.checkState;
	}

	public void setCheckState(int checkState) {
		this.checkState = checkState;
	}

	@Column(name = "FLY_RESULT")
	public Integer getFlyResult() {
		return this.flyResult;
	}

	public void setFlyResult(Integer flyResult) {
		this.flyResult = flyResult;
	}

	@Column(name = "ORAL_RESULT")
	public Integer getOralResult() {
		return this.oralResult;
	}

	public void setOralResult(Integer oralResult) {
		this.oralResult = oralResult;
	}

	@Column(name = "REFUSED_REASON", length = 65535)
	public String getRefusedReason() {
		return this.refusedReason;
	}

	public void setRefusedReason(String refusedReason) {
		this.refusedReason = refusedReason;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "studentRecommend")
	public Set<TrainPlan> getTrainPlans() {
		return this.trainPlans;
	}

	public void setTrainPlans(Set<TrainPlan> trainPlans) {
		this.trainPlans = trainPlans;
	}

}
